package cn.gson.springboot.model.mapper.salemapper;

import cn.gson.springboot.model.pjos.*;
import cn.gson.springboot.model.vo.aftervo.MainProductVo;
import cn.gson.springboot.model.vo.salesvo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
@Transactional
public interface OrderMapper {
    /**
     * 订单查询
     * @return
     */
    public List<OrderInfo> orderinfo(Integer empId,Integer type,String name);

    /**
     * 订单收货人
     * @param cusId
     * @return
     */
    public List<Receivingcontact> receInfo(Integer cusId);


    public List<Products> OrderqueryDetais(Integer businesId);

    public OrderInfo orderdetailsinfo(@Param("empId") Integer empId, @Param("id") Integer id);

    /**
     * 订单下的产品
     * @param orderId
     * @return
     */
    public List<Orderdetails> orderProductInfo( @Param("orderId") Integer orderId);


    /**
     * 发货单主界面
     * @return
     */
    public List<OrderInfo> invoiceList( String name, String startTime,String endTime);

    /**
     * 交付界面（指定订单）
     * @param orderId
     * @return
     */
    public List<Deliverydetails> deliverydetails(Integer orderId);

    /**
     * 收货地址
     * @param ctId
     * @return
     */
    public Receivingcontact receivList(Integer ctId);


    /**
     * 指定订单》》指定交付计划
     * @param orderId
     * @param deliveryId
     * @return
     */
    public List<DeliveryplanVo> deliveryProduct(@Param("orderId") Integer orderId,@Param("deliveryId") Integer deliveryId);


    public Zproductside upData(Integer id);


    public void upProduct(Integer psNumber,Integer id);

    public List<ZfhuodanEntity> zfhuodanList();


    public List<ProductNumberVo> productNumberList(Integer id);

    public List<OrderProductNumberVo> orderNumberList(Integer id);

    public List<ZfhuodanEntity> zfhuodanRecord(Integer id);


    /**
     * 合同信息栏
     */
    public List<OrderInfo> contractOrderInfo(Integer orderId);


    /**
     * 换货单
     * @return
     */
    public List<SaExchangInfoVo> saExchangInfozhao(String searchInfo);

    /**
     * 退货单
     * @return
     */
    public List<SaRetouerInfoVo> saRouterInfozhao(String selctInfo);

    /**
     * 发货单
     * @return
     */
    public List<ZfhuodanEntity> zfhuodanzhao(String selctInfo);


    /**
     * 发货单详情
     */
    public List<MainProductVo>jouerFhuoInfo(Integer deliverId);
}
